<template>
              <a-card :title="bookinfo_title">
                <div class="logo" />
                <div>
                  <a-spin :spinning="is_bookinfo_spinning" />
                  <a-row v-for="(item, i) in info" :key="i">
                    <a-col span="4"> {{ item.key }}</a-col>
                    <a-col span="18" v-html="item.value"> </a-col>
                    <a-row>
                      <a-divider dashed />
                    </a-row>
                  </a-row>
                </div>
                <a-row data-id="intro">
                  <p>{{ intro }}</p>
                </a-row>
                <a-row>
                  <a-col
                    :span="i == 0 ? 5 : 3"
                    v-for="(c, i) in bookinfo_columns"
                    :key="i"
                  >
                    {{ c }}
                  </a-col>
                </a-row>
                <a-row>
                  <a-divider dashed />
                </a-row>
                <a-row v-for="(d, i) in bookinfo_data" :key="i">
                  <a-col
                    :span="j == 0 ? 5 : 3"
                    v-for="(cd, j) in d"
                    :key="j"
                    v-html="cd"
                  >
                    {{ cd }}
                  </a-col>
                  <a-divider dashed />
                </a-row>
              </a-card>
</template>
<script>
import appApi from '../../../../utils/api'
export default {
    props: {
        bookinfo_title: String,
        id:Number
    },
    computed: {
        title() {
            if (this.bookinfo_title) {
                return this.bookinfo_title;
            } else {
                return this.title;
            }
        },
    },
    data: () => ({
        book_already_showing: false,
        is_show_sider_bar: false,
        is_drawer_visible: false,
        drawer_palcement: "left",
        is_bookinfo_visible: false,
        // title: "",
        is_bookinfo_spinning: false,
        bookinfo_columns: [],
        bookinfo_data: [],
        intro: "",
        info: [],
        deep: true,
    }),
    mount() {
        // this.setupTableData();
        // this.setupTableColumns();
    },
    methods: {
      // 获取详情
        GetBookInfo: function(marc_no) {
            this.is_bookinfo_spinning = true;
            var that = this;
            var param={marc_no: marc_no};
            appApi.PagerGetBookInfo(param)
                .then(response => {
                    var data = response.data;
                    var x = data;
                    that.info = x.info;
                    that.bookinfo_columns = x.header;
                    that.bookinfo_data = x.body;
                    that.is_bookinfo_spinning = false;
                });
        },
    },
};
</script>